<?php 

/**
 * Joomla! 1.5 component arts_curriculum
 * @package    com_arts_curriculum
 * @subpackage
 * @author     Chris Borkowski {@link http://www.guggenheim.org}
 * @author     Created on 15-December-2009
 * @author     Modified on 05-February-2010
 */

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
// image eval and condition statement -->
	 
	 function imagevalues($image) {
			
			$imagepath = JURI::base().'images/content/arts_curriculum/thumbs/'. $image ;
			
			list($width, $height, $type, $attr) =getimagesize($imagepath);
			$ht=$height;
			$wd=$width; 
			if($width == 120){
			$imgdim = 'width="120" height="92"';
			$padding = 'padding:51.5px 12.5px;';
			}elseif ($height == 120) {
			$imgdim = 'height="125" width="91"';
			$padding = 'padding:35px 27px;';
			}
			
			
	}

$k=1;

?>
<div id="ac_lesson_page">

<div id="ac_lesson_cat_title">
<a href="<?php echo JRoute::_( 'index.php?view=category&id='.$this->item->cat_id); ?>"class="ac_category_cat_link">
<h2><?php echo $this->item->category; ?></h2>
</a>
</div>

<div id="ac_lesson_title"><h4><?php echo $this->escape($this->item->title); ?></h4>
</div>

<?php $uri =& JFactory::getURI(); ?>
 <div id="container-1"><!--begin tabs -->
            <ul>
                
                <li><a href="<?php echo $uri->toString() ;?>#fragment-1"><span>Teacher Information</span></a></li>
                <li><a href="<?php echo $uri->toString() ;?>#fragment-2"><span>View + Discuss</span></a></li>
				<li><a href="<?php echo $uri->toString() ;?>#fragment-3"><span>Further Exploration</span></a></li>
				
            </ul>

	<div id="fragment-1"> <!-- we're indexed on 3 to start because or right orientation -->
		<?php if( $this->item->main_body !=""): ?>
		<div id="ac_lesson_main_body">
		<p><?php echo $this->item->main_body; ?></p>
		</div>
		<?php endif; ?>
	</div><!--end fragment-1 -->
	
	
	<div id="fragment-2">
		
<!-- image section -->
<div id="ac_lesson_images_box"> 
<!-- image1 -->
<?php if( $this->item->image1 !=""): ?>
<?php Arts_curriculumFrontHelper::lightboxthumbs( & $this->item->image1, & $this->item->title, & $this->item->artist_name, & $this->item->imgcap1, & $k); ?>
<?php endif; ?>

<!-- image2 -->
<?php if( $this->item->image2 !=""):  $k++; ?>
<?php Arts_curriculumFrontHelper::lightboxthumbs( & $this->item->image2, & $this->item->title, & $this->item->artist_name, & $this->item->imgcap2, & $k); ?>
<?php endif; ?>

<!-- image3 -->
<?php if( $this->item->image3 !="") :  $k++; ?>
<?php Arts_curriculumFrontHelper::lightboxthumbs( & $this->item->image3, & $this->item->title, & $this->item->artist_name, & $this->item->imgcap3, & $k); ?>
<?php endif; ?>

<!-- image4 -->
<?php if( $this->item->image4 !="") :  $k++; ?>
<?php Arts_curriculumFrontHelper::lightboxthumbs( & $this->item->image4, & $this->item->title, & $this->item->artist_name, & $this->item->imgcap4, & $k); ?>
<?php endif; ?>

</div><!--ac_lesson_images_box-->
			
			<div id="ac_lesson_view_n_dis">
			<p><?php echo $this->item->view_n_dis; ?></p>
			</div>
		
			<div id="ac_lessons_image_caps_box">
			
				<div id="imgcap1">
				<?php echo $this->item->imgcap1; ?><br />
				</div>
				
				<div id="imgcap2">
				<?php echo $this->item->imgcap2; ?><br />
				</div>
				<div id="imgcap3">
				<?php echo $this->item->imgcap3; ?><br />
				</div>
				
				<div id="imgcap4">
				<?php echo $this->item->imgcap4; ?><br />
				</div>
			
			</div>			

</div><!--end fragment-2 -->

<div id="fragment-3"><!-- we're indexed on 3 to start because of right orientation -->
		
	<?php if( $this->item->further_reading !=""): ?>
		<p><div id="ac_lesson_further_reading"></p>
		<?php echo $this->item->further_reading; ?>
		</div>
	<?php endif; ?>
	</div>
		
		

</div><!--end tabs -->
		
</div><!-- end ac_lesson_page-->